<template>
	<view class="">
		<nav-bar title="地址编辑"></nav-bar>

		<van-address-edit :address-info="address" :area-list="areaList" show-delete
			:area-columns-placeholder="['请选择', '请选择', '请选择']" @save="onSave" @delete="onDelete" />

	</view>
</template>

<script>
	import {
		areaList
	} from '@vant/area-data';
	const Address = uniCloud.importObject('address')
	export default {
		setup() {
			return {
				areaList
			};
		},
		data() {
			return {
				address: {}
			}
		},
		onLoad(o) {
			Address.get(o.id).then(res => {
				this.address = res.data[0]
				this.address.addressDetail = this.address.detail
				console.log(res);
			})
		},
		methods: {
			onSave() {},
			onDelete() {}
		}
	};
</script>

<style>
</style>
